package day03;

import java.util.Scanner;

public class IfElseIfDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入您的消费金额");
        double price = scanner.nextDouble();
        if(price>=500 && price<1000){
            price *= 0.8;
        }else if(price>=1000 && price<2000){
            price *= 0.8;

        }else if(price>=2000 && price<3000){
            price *= 0.7;

        }else if(price>=3000){
            price *= 0.6;

        }else {
            price *= 0.9;
        }
        System.out.println("您的总消费金额是："+price);
    }
}
